package com.supper.model;

/**
 * @author yutao
 * @since 2020/4/13 12:06 下午
 */
public class Person {

    private Car car;

    public Person() {
    }

    public Person(Car car) {
        this.car = car;
        System.out.println("构造方法注入");
    }

    public void setCar(Car car) {
        this.car = car;
        System.out.println("通过setter方法注入");
    }

    @Override
    public String toString() {
        return "Person{" +
                "car=" + car +
                '}';
    }
}
